<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
	/* http://localhost:8080/logistics/  */
%>
<!DOCTYPE HTML>
<html>
<head>
<!-- 设置当前页面基础路径 -->
<base href="<%=basePath%>">
<meta charset="UTF-8">
	<link rel="stylesheet" href="lib/zTree/v3/css/zTreeStyle/zTreeStyle.css" type="text/css">
<title>Insert title here</title>
</head>
<body>

<!-- 
ol : 有序列表 order List
ul : 无序列表 unorder List 
-->

<ul id="permissionTree" class="ztree"></ul>


<script type="text/javascript" src="lib/jquery/1.11.3/jquery.min.js"></script>
<script type="text/javascript" src="lib/zTree/v3/js/jquery.ztree.all-3.5.min.js"></script>

<script type="text/javascript">
/* zTree的设置对象，如果不写任何配置，就是加载zTree默认配置 */
	var setting = {
			data: {
				simpleData: {
					enable: true,
					/* 设置zTree的id的名称：和权限id保持一致 */
					idKey:"permissionId",
					/* 设置zTree的pId的名称：和权限的父id保持一致 */
					pIdKey:"parentId"
				}
			},
			check:{
				/* 是否显示复选框 */
				enable:true
			}
		};

/* zTree显示效果对应的支撑数据 */
 var zNodes = [
	{permissionId:1, parentId:0, name: "管理员管理",open:true},
	{permissionId:11, parentId:1, name: "权限管理"},
	{permissionId:12, parentId:1, name: "角色管理"},
	{permissionId:12, parentId:1, name: "管理员列表"},
	{permissionId:13, parentId:0, name: "系统管理",open:true},
	{permissionId:14, parentId:13, name: "基础数据管理"}
];
/* 文档初始化jquery执行  */
$(function(){
	/* 初始化zTree */
	$.fn.zTree.init($("#permissionTree"), setting, zNodes);
})


</script>

</body>
</html>